import Link from "next/link";
import React from "react";
import TextAtom from "../../Atoms/Text.Atom";
import TextAtomEnum from "../../Atoms/Text.Atom/enum";

interface DescriptionProductProps {
  description?: string;
  title?: string;
  link?: string;
}

const DescriptionProduct: React.FC<DescriptionProductProps> = (props) => {
  const { title, description, link } = props;

  return (
    <div className="flex flex-col w-1/3 gap-y-4">
      <TextAtom
        type={TextAtomEnum.enum_h3}
        className="font-bold uppercase text-tiffany"
      >
        {title}
      </TextAtom>
      <TextAtom
        type={TextAtomEnum.enum_h4}
        className="text-regular text-textColor"
      >
        {description}
      </TextAtom>
      {link && (
        <Link href={link}>
          <TextAtom
            type={TextAtomEnum.enum_h6}
            className="text-tiffany hover:text-bg_hover active:text-bg_active font-bold"
          >
            {link}
          </TextAtom>
        </Link>
      )}
    </div>
  );
};

export default React.memo(DescriptionProduct);
